import java.util.*;

/**
 * @author LKQ
 * @date 2022/6/14 13:00
 * @description 枚举
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt();
            List<int[]> ans = new ArrayList<>();
            for (int i = 0; i < 20; i++) {
                for (int j = 0; j < (100 - 5 * i) / 3; j++) {
                    if ((i + j + (100 - 5 * i - 3 * j) * 3) == 100) {
                        ans.add(new int[]{i, j, (100 - 5 * i -  3 * j) * 3});
                    }
                }
            }
            for (int[] a : ans) {
                System.out.println(a[0] + " " + a[1] + " " + a[2]);
            }
        }
    }
}
